﻿using FluentNHibernate.Mapping;
using NHibernate.Type;
using Salary.Domain;

namespace Salary.NHibernate.Mappings
{
    public class SaleMap : ClassMap<Sale>
    {
        public SaleMap()
        {
            Table("Sales");
            Id(x => x.Id);
            References(x => x.Employee);
            Map(x => x.Date).CustomType<LocalDateTimeType>();
            Map(x => x.Summ).CustomSqlType("decimal");
        }
    }
}
